package com.example.yunJie.digitalSentry.service.impl;

import com.example.yunJie.digitalSentry.entity.PeriodEntity;
import com.example.yunJie.digitalSentry.mapper.one.PeriodMapper;
import com.example.yunJie.digitalSentry.service.PeriodService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

@Service
@RequiredArgsConstructor
public class PeriodServiceImpl implements PeriodService {


    private final PeriodMapper periodMapper;

    @Override
    public int insert(PeriodEntity periodEntity) {
        return periodMapper.insert(periodEntity);
    }

    @Override
    public int update(PeriodEntity periodEntity) {
        return periodMapper.update(periodEntity);
    }

    @Override
    public int deleteById(Serializable id) {
        return periodMapper.deleteById(id);
    }

    @Override
    public int deleteIdList(List<Integer> idList) {
        return periodMapper.deleteIdList(idList);
    }

    @Override
    public PeriodEntity findId(String  id) {
        return periodMapper.findId(id);
    }

    @Override
    public PeriodEntity findByMode(String mode) {
        return periodMapper.findByMode(mode);
    }

    @Override
    public List<PeriodEntity> findAllByPeriod(PeriodEntity periodEntity) {
        return null;
    }

    @Override
    public List<PeriodEntity> findAll() {
        return periodMapper.findAll();
    }
}
